package com.company.netease;

import java.util.Scanner;

public class Main1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i  < n ; i++) {
            arr[i] = sc.nextInt();
        }
        int res = getMostSuShu(arr,n);
        System.out.println(res);
    }

    // 得到最多的素数
    private static int getMostSuShu(int[] arr, int n) {
        int res = 0;
        for (int i = 0; i < n ; i++) {
            if(arr[i] == 1){
                continue;
            }else if(arr[i] >= 2 && arr[i] <= 3){
                res++;
            }else{
                // 大于等于4
                if((arr[i] & 1) == 0){
                    res = res + (arr[i] >>1);
                }else{
                    res = res + ((arr[i] - 3) >> 1) + 1;
                }
            }
        }
        return res;
    }
}
